//
//  MusicDetailTableViewCell.m
//  享动
//
//  Created by darker on 16/4/9.
//  Copyright © 2016年 HHUI. All rights reserved.
//

#import "MusicDetailTableViewCell.h"
#import <UIImageView+WebCache.h>
@implementation MusicDetailTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.iconView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 50, 50)];
        [self.iconView.layer setCornerRadius:25];
        //self.iconView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_iconView];
        
        
        self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(80, 10, KWIDTH - 120, 50)];
        self.nameLabel.textAlignment = NSTextAlignmentLeft;
        //self.nameLabel.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_nameLabel];
        
        
        self.moreButton = [UIButton buttonWithType:UIButtonTypeSystem];
        
        self.moreButton.frame = CGRectMake(KWIDTH - 45, 15, 25, 25);
        [self.moreButton setBackgroundImage:[UIImage imageNamed:@"greenstar"] forState:UIControlStateNormal];
        [self.moreButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    
        [self.contentView addSubview:_moreButton];
        
        self.chooseView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, KWIDTH, 70)];
        self.chooseView.backgroundColor = [UIColor colorWithRed:136/255.0 green:205/255.0 blue:85/255.0 alpha:0.3];
        self.chooseView.hidden = YES;
        [self.contentView addSubview:_chooseView];
        
        
//        self.moreView = [[UIView alloc]initWithFrame:CGRectMake(0, 70, KWIDTH, 40)];
//        self.moreView.backgroundColor = [UIColor darkGrayColor];
//        self.moreView.hidden = YES;
//        [self.contentView addSubview:_moreView];
//        
//        
//        self.collectionButton = [UIButton buttonWithType:UIButtonTypeSystem];
//        self.collectionButton.frame = CGRectMake((KWIDTH - 75)/3, 5, 25, 25);
//        [self.collectionButton setTitle:@"💛" forState:UIControlStateNormal];
//        [_moreView addSubview:_collectionButton];
        

        
    }
    return  self;
}
- (void)cellFormodel:(musicRunModel *)model
{
    _model = model;
    
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:model.albumUrl]];
    
    self.nameLabel.text = model.name;
    
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
